package com.sugon.service.impl;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.RandomUtil;
import com.sugon.dao.ErmsKpiDeviceDao;
import com.sugon.entity.ErmsKpiDeviceEntity;
import com.sugon.service.ErmsKpiDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 设备级月度KPI值,PMWCL, PMYQL, MTBF, MTTR, OEE, QTJTXSJ, SBKDLService实现类
 *
 * @author sugon
 * @date 2021-03-24 18:53:33
 */
@Service("ermsKpiDeviceService")
public class ErmsKpiDeviceServiceImpl implements ErmsKpiDeviceService {
    @Autowired
    private ErmsKpiDeviceDao ermsKpiDeviceDao;

    @Override
    public int save(ErmsKpiDeviceEntity ermsKpiDevice) {
        ermsKpiDevice.setId(RandomUtil.randomString(32));
        ermsKpiDevice.setGmtCreate(DateUtil.date());
        return ermsKpiDeviceDao.save(ermsKpiDevice);
    }

}
